package main

import (
	"fmt"
	"reflect"
)

type Reflect struct {
	name string `标签`
	age  int    `标签的一个说明`
}

func getValue(input interface{}) {
	types := reflect.TypeOf(input)
	fmt.Println(types)
	value := reflect.ValueOf(input)
	fmt.Println(value)
	for i := 0; i < types.NumField(); i++ {
		fmt.Println(types.Field(i).Type)
	}
}

func main() {
	var r Reflect
	r.age = 2
	r.name = "33"
	getValue(r)
}
